<?php
/* @var $this LocationController */
/* @var $model Location */
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr class="texteSimple">
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td align="center" class="titresIndex">Fiches de Présentation</td>
        </tr>
        <tr>
          <td>
          <table width="100%" border="0" cellpadding="10" cellspacing="0" id="pageFooter">
            <tr>
              <td align="center" class="pageDuFooter">
              <table width="100%" border="0" cellpadding="0" cellspacing="5" class="texteSimple">
                <tr>
                  <td width="117">Liste des fiches présentes :</td>
                  <td width="117" align="right">Créer une nouvelle fiche <a href="<?php echo Yii::app()->baseUrl; ?>/backend/?r=location/create"><img src="<?php echo Yii::app()->baseUrl; ?>/images/icon_add.png" alt="" width="18" height="18" border="0" align="absmiddle"></a></td>
                </tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                </tr>
                <tr>
                  <td >
					<div class="search-form">
					<?php $this->renderPartial('_search',array(
						'model'=>$model,
					)); ?>
					</div><!-- search-form -->
                </tr>
                </table>
               </td>
             </tr>
             
			 <tr>
		        <td align="center"  class="pageDuFooter"> 
		         	<table width="100%" border="0" cellpadding="0" cellspacing="5" class="texteSimple">
               		<tr>   
               			<td>          
						<?php $this->widget('zii.widgets.grid.CGridView', array(
							'id'=>'location-grid',
							'dataProvider'=>$model->search(),
							//'template'=>'{items}',
							
							'cssFile' => Yii::app()->baseUrl . '/css/dbs.css',
							'itemsCssClass' => 'premiumGrid',
							
								'columns'=>array(	
								'id',							
								'NameFr',
								'idDepartment.code',
								'idType.name',
								'viewed',
								'mailed',

								array(

									'name'=>'image',
									'type'=>'html',
									'value'=>'CHtml::image($data->mainImage->getImagePath(\'210x70\'),"",array())',
									),
								array(
									'class'=>'CButtonColumn',
									'template'=>'{update}',
									'updateButtonImageUrl' => Yii::app()->baseUrl . '/images/icon_modify.png',
								),
								array(
										'class'=>'CButtonColumn',
										'template'=>'{delete}',
										'deleteButtonImageUrl' => Yii::app()->baseUrl . '/images/icon_delete.png',
								),


							),
						)); ?>
						</td>
					</tr>
                	</table>
					</td>
				</tr>
				            
          </table>
          </td>
        </tr>     
</table>
